import { PORT3 } from "@/api/config/servicePort";
import http from "@/api";
import { Warehouse } from "../interface/warehouse";

// 查询库存物品
export const warehouseListByWarehouse = (params: Warehouse.SearchParams) =>
  http.post<Warehouse.Search[]>(PORT3 + `/warehouse/listByWarehouse`, params);

// 调拨仓库
export const warehouseAllot = (params: Warehouse.ReqAllotProps) => http.post(PORT3 + `/warehouse/allot`, params);

// 转移位置
export const warehouseMove = (params: Warehouse.ReqMoveProps) => http.post(PORT3 + `/warehouse/move`, params);

// 查询已锁定,但未出库的库存
export const warehouseListByLock = (params: Warehouse.SearchParams) =>
  http.post<Warehouse.Search[]>(PORT3 + `/warehouse/listByLock`, params);
